package droid.engine;

import android.view.*;
import android.content.*;
import android.graphics.*;

public class Panel extends View {
	
	public Panel(Context context) {
		super(context);
	}

	@Override
	public void onDraw(Canvas canvas) {		
		Display display = ((WindowManager)getContext().getSystemService(Context.WINDOW_SERVICE)).getDefaultDisplay();
		int width = display.getWidth();
		int height = display.getHeight();
		int midX = width /2;
		int midY = height / 2;
		
		Paint paint = new Paint();
		canvas.drawColor(Color.BLACK);
		
		paint.setColor(Color.RED);
		canvas.drawRect(0, 0, midX, midY, paint);
		
		paint.setColor(Color.GREEN);
		canvas.drawRect(midX, 0, width, midY, paint);
		
		paint.setColor(Color.YELLOW);
		canvas.drawRect(0, midY, midX, height, paint);
		
		paint.setColor(Color.BLUE);
		canvas.drawRect(midX, midY, width, height, paint);
	}
}
